home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / meta-lang-faq < prev    next >
Encoding:
Text File  |  1995-07-25  |  42.1 KB  |  1,076 lines

  1. Subject: Comp.Lang.ML FAQ [Monthly Posting]
  2. Newsgroups: comp.lang.ml,comp.answers,news.answers
  3. From: jgmorris@cs.cmu.edu (Greg Morrisett)
  4. Date: 10 Nov 1994 15:25:56 GMT
  5.  
  6. Archive-name: meta-lang-faq
  7. Last-modified: 1994/05/25
  8.  
  9.  
  10.          COMP.LANG.ML Frequently Asked Questions and Answers 
  11.        (compiled by Dave Berry and Greg Morrisett)
  12.  
  13. Please send corrections, additions, or comments regarding this list to
  14. comp-lang-ml-request@cs.cmu.edu.  
  15.  
  16. Contents:
  17. ---------
  18.     1. What is ML?
  19.     2. Where is ML discussed?
  20.         a. Comp.Lang.ML
  21.         b. SML-LIST
  22.         c. CAML-LIST
  23.     3. What implementations of ML are available?
  24.         a. quick summary (by machine/OS)
  25.         b. Poly/ML
  26.         c. Standard ML of New Jersey
  27.         d. Poplog ML
  28.         e. ANU ML
  29.         f. MicroML
  30.         g. sml2c
  31.         h. Caml Light
  32.         i. ML Kit Compiler
  33.         j. Moscow SML
  34.     4. Unsupported SML/NJ Ports
  35.         a. MS-DOS/Windows
  36.         b. Linux
  37.         c. OS/2
  38.         d. NEXTSTEP
  39.         5. Where can I find documentation/information on ML?
  40.         a. The Definition
  41.         b. Textbooks
  42.         c. Info on the net
  43.     6. Where can I find ML library code?
  44.         a. The Edinburgh SML Library
  45.         b. The SML/NJ Library
  46.         c.
  47.     7. Theorem Provers and ML
  48.         8. Miscellaneous Questions
  49.         a. How do I write the Y combinator in SML?
  50.         b. Where can I find an X-windows interface to SML?
  51.         c. How do I call a C function from SML/NJ?
  52.         d. How do I fix the emacs mode to work with emacs 19?
  53. --------------------------------------------------------------------------
  54. 0. Where can I find the latest copy of this FAQ?
  55.  
  56.   This document can be retrieved via anonymous ftp from 
  57.   pop.cs.cmu.edu:/usr/jgmorris/sml-archive/faq.txt or from
  58.   rtfm.mit.edu.
  59.  
  60. --------------------------------------------------------------------------
  61. 1. What is ML?
  62.  
  63.   ML (which stands for Meta-Language) is a family of advanced programming 
  64.   languages with [usually] functional control structures, strict semantics, 
  65.   a strict polymorphic type system, and parametrized modules.  It includes 
  66.   Standard ML, Lazy ML, CAML, CAML Light, and various research languages.  
  67.   Implementations are available on many platforms, including PCs, mainframes,
  68.   most models of workstation, multi-processors and supercomputers.  ML has 
  69.   many thousands of users, is taught at many universities (and is the first
  70.   programming language taught at some).
  71.  
  72. --------------------------------------------------------------------------
  73. 2. Where is ML discussed?
  74.  
  75. COMP.LANG.ML
  76. ------------
  77. comp.lang.ml is a moderated usenet newsgroup.  The topics for discussion
  78. include but are not limited to:
  79.  
  80.    * general ML enquiries or discussion 
  81.    * general interpretation of the definition of Standard ML 
  82.    * applications and use of ML 
  83.    * announcements of general interest (e.g. compiler releases)
  84.    * discussion of semantics including sematics of extensions based on ML
  85.    * discussion about library structure and content
  86.    * tool development
  87.    * comparison/contrast with other languages
  88.    * implementation issues, techniques and algorithms including extensions
  89.        based on ML
  90.  
  91. Requests should be sent to:
  92.  
  93.     comp-lang-ml@cs.cmu.edu
  94.  
  95. Administrative mail should be sent to:
  96.  
  97.     comp-lang-ml-request@cs.cmu.edu
  98.  
  99. Messages sent to the newsgroup are archived at CMU.  The archives can be
  100. retrieved by anonymous ftp from internet sites.  Messages are archived
  101. on a year-to-year basis.  Previous years' messages are compressed using
  102. the Unix "compress" command.  The current year's messages are not
  103. compressed.
  104.  
  105.     ftp pop.cs.cmu.edu
  106.     username: anonymous
  107.     password: <username>@<site>
  108.     binary
  109.     cd /usr/jgmorris/sml-archive
  110.     get sml-archive.<year>.Z
  111.     quit
  112.     zcat sml-archive.<year>.Z
  113.  
  114. (Pop's IP address is 128.2.205.205).
  115.  
  116. Individual messages can also be accessed in the directories
  117. /usr/jgmorris/mh-sml-archive/<year>-sml.
  118.  
  119. SML-LIST
  120. --------
  121. The SML-LIST is a mailing list that exists for people who cannot
  122. (or do not want to) read the Usenet COMP.LANG.ML newsgroup. 
  123. Messages are crossposted from COMP.LANG.ML to the SML-LIST and
  124. vice-versa.  You should ask to join the SML-LIST _only if_ you cannot
  125. (or do not want to) read the Usenet COMP.LANG.ML newsgroup.
  126.  
  127. To send a message to the SML-LIST distribution, address it to:
  128.  
  129.     sml-list@cs.cmu.edu
  130.  
  131. (sites not connected to the Internet may need additional routing.)
  132.  
  133. Administrative mail such as requests to add or remove names from the
  134. distribution list should be addressed to 
  135.  
  136.     sml-list-request@cs.cmu.edu
  137.  
  138.  
  139. CAML-LIST
  140. ---------
  141. The Caml language, a dialect of ML, is discussed on the Caml mailing
  142. list.  To send mail to the Caml mailing list, address it to:
  143.  
  144.     caml-list@margaux.inria.fr
  145.  
  146. Administrative mail should be addressed to:
  147.  
  148.     caml-list-request@margaux.inria.fr
  149.  
  150. ALT.LANG.ML
  151. -----------
  152. Another venue for ML-related discussion is the Netnews group
  153. alt.lang.ml, though this has seen relatively little traffic.  
  154. --------------------------------------------------------------------------
  155. 3. What implementations of ML are available and where can I find them?
  156.    (Note, this information may be out of date.)
  157.  
  158. Quick Summary:
  159.  
  160. System    full SML?  contact                        Platforms
  161. ------    ---------  ------------                 ------------------------------
  162. Poly/ML       yes       ahl@ahl.co.uk                SPARC/SUNOS, SPARC/Solaris
  163.  
  164. SML/NJ       yes     dbm@resarch.att.com             Unix/Sparc,Mips,Vax,680x0,
  165.            ftp research.att.com             I386/486,HPPA,RS/6000,
  166.                          MacOS/MacII
  167.            ftp.rz.uni-karlsruhe.de     Linux (including binaries)
  168.            ftp-os2.nmsu.edu         OS/2  (including binearies)
  169.            ftp.informatik.uni-muenchen.de Nextstep
  170.  
  171. PoplogML   yes       isl@integ.uucp,             VMS/Vax, Unix/Vax,Suns,Sparcs,
  172.            alim@uk.ac.sussex.cogs,       Solbourne, Sequent Symmetry,
  173.            pop@cs.umass.edu             HP M680?0, Apollo, AUX/MacII
  174.  
  175. Edinburgh  core       ftp ftp.dcs.ed.ac.uk             32-bit machines (bytecode)
  176.            ftp ftp.informatik.uni-muenchen.de PC 80386SX+
  177.  
  178. ANU ML       core    mcn@anucsd.anu.edu.au     Sun-3, Ultrix/Vax, Pyramid,
  179.                          AUX/MacII
  180.  
  181. MicroML       core    olof or mahler @cs.umu.se     PC 80286+ (bytecode)
  182.            ftp ftp.cs.umu.se
  183.  
  184. sml2c       yes       dtarditi@cs.cmu.edu         32-bit Unix machines (C code)
  185.            ftp dravido.soar.cs.cmu.edu
  186.  
  187. Caml Light coreish caml-light@margaux.inria.fr     32-bit Unix, Mac, PC 8086,
  188.            ftp ftp.inria.fr         PC 80386 (bytecode)
  189.  
  190. Kit       yes       ftp ftp.diku.dk         (Requires another SML compiler
  191.            ftp ftp.dcs.ed.ac.uk          to build binaries)
  192.  
  193. Moscos SML core    sestoft@id.dtu.dk         PC 80386, Unix (bytecode)
  194.            ftp dina.kvl.dk
  195.  
  196. Details:
  197.                
  198. Poly/ML:
  199.     Poly/ML produces native code for SPARC systems under either
  200. SUNOS (4.1) or Solaris (2.3). A PC version is currently under
  201. development.  Poly/ML uses a persistent store and supports arbitrary
  202. precision integer arithmetic. The Motif Edition of Poly/ML comes
  203. with a make system, an X11/Xlib interface, and a OSF/Motif
  204. interface.  Non-standard extensions include concurrent processes and
  205. an associated message-passing scheme.
  206.     Poly/ML is a commercial product from Abstract Hardware Ltd.
  207. (ahl@ahl.co.uk).  The price of the Motif edition is 1250 pounds for an
  208. academic site licence or 3500 pounds per machine for commercial users.
  209. Multiple and site licences are available by negotiation.
  210.  
  211. Standard ML of New Jersey:
  212.         Standard ML of New Jersey was developed jointly at AT&T Bell
  213. Laboratories and Princeton University.  It is an open system (source
  214. code is freely available) implemented in Standard ML.  Version 0.93 of
  215. SML/NJ generates native code for 68020, SPARC, and MIPS (big and
  216. little endian), I386/486, HPPA(HP9000/700), and RS/6000 architectures
  217. under various versions of the Unix operating system (SunOS, Ultrix,
  218. Mach, Irix, Riscos, HPUX, AIX, AUX, etc.), and on the MacIntosh OS
  219. (Mac II, System 7.x, min 12MB ram).  Version 0.75 runs on the Vax
  220. under Ultrix, BSD, and Mach.
  221.     SML/NJ comes with a source-level debugger, profiler, gnu emacs
  222. interface, ML implementations of LEX, YACC, and Twig, separate compilation
  223. facilities, Concurrent ML, the eXene X Window library, and the SML/NJ
  224. library.  It runs interactively and can produce stand-alone executable
  225. applications.
  226.     Non-standard extensions include typed first-class continuations,
  227. Unix signal handling, and higher-order functors.
  228.         SML/NJ is copyrighted by AT&T but the system, including source
  229. code, is freely distributable.  It is available by anonymous ftp from
  230. research.att.com (192.20.225.2) and princeton.edu (128.112.128.1).
  231. Login as "anonymous" with your user name as password.  Put ftp in
  232. binary mode and copy the (compressed tar) files you need from the
  233. directory dist/ml (pub/ml on princeton.edu).  You only need the 93.mo.*.tar.Z 
  234. files for your machine in addition to the 93.src.tar.Z.  (You might also 
  235. want the 93.release-notes.[ps|txt], 93.tools.tar.Z, 93.doc.tar.Z, and 
  236. smlnj-lib-0.2.tar.Z files.)  Alternatively mail dbm@research.att.com.  
  237. In the UK, SML/NJ is available from the LFCS.
  238.     There are unsupported ports of SML/NJ to other platforms, including
  239. Linux, FreeBSD, NEXTSTEP, OS/2, and Microsoft Windows 3.1.  See the 
  240. "Unsupported SML/NJ Ports" section for details.
  241.  
  242. Poplog ML:
  243.         Standard ML is supported as part of the Poplog system, which also
  244. provides incremental compilers for Pop-11, Common Lisp and Prolog in a
  245. common environment with shared data-structures, so that mixed language
  246. programming is possible. The integrated editor and HELP mechanism
  247. support online teaching aids.  Poplog comes with an X Windows interface.
  248.     Poplog is available for VAX+VMS, VAX+Ultrix, VAX+Bsd 4.2/3,
  249. Sun-2,3,4, Sun386i, SPARCstation, Solbourne, Sequent Symmetry (with Dynix),
  250. HP M680?0+Unix workstations and Apollo+Unix. Versions for MAC-II with A/UX,
  251. DECstation 3100 and MIPS will be available shortly.
  252.         UK educational users should contact the School of Cognitive and
  253. Computing Sciences, University of Sussex (alim@uk.ac.sussex.cogs).  People in
  254. the USA or Canada should contact Computable Functions Inc. (pop@cs.umass.edu).
  255. All others should contact Integral Solutions Ltd. (isl@integ.uucp).  UK
  256. academic prices start at 600 pounds.  Non-UK academic prices start at 1125
  257. pounds.  Commercial prices start around 2,000 pounds for an ML-only version
  258. or 7,500 pounds for the full Poplog system.
  259.  
  260. Edinburgh ML 4.0:
  261.     Edinburgh ML 4.0 is an implementation of the core language (without
  262. the module system).  It uses a bytecode interpreter, which is written in C
  263. and runs on any machine with 32 bit words, a continuous address space and
  264. a correct C compiler.  Ports to various 16 bit machines are underway.  The
  265. bytecode interpreter can be compiled with switches to avoid the buggy parts
  266. of the C compilers that we've used it with (as far as I know none of them
  267. worked correctly).  
  268.     Edinburgh ML 4.0 is available from the LFCS.  
  269.     A port to PCs with 386SX processors or better is available by FTP
  270. from ftp.informatik.uni-muenchen.de, in the file 
  271. pub/comp/programming/languages/sml/ibmpc/edml3864.exe.
  272. Contact Joern Erbguth (jnerbgut@cip.informatik.uni-erlangen.de) for more 
  273. information. 
  274.     Also, there are apparently 8086 and 80386-specific ports of Edinburgh 
  275. ML 3.5 in the same location.  The 386 port is in the file edml3863.exe.
  276.     Some information from Felix von Normann follows:
  277.  
  278.     There are other Edinburgh (PC-)ports of ML including an OS/2 2.x, 
  279.     an OS/2 PM and a Dos version. A new version has just been made 
  280.     ready and is available at forwiss.uni-passau.de (132.231.1.10) in
  281.     pub/ibmpc/os2/lang/sml/sml04.zip. It is about 360K long (short?).
  282.  
  283.     All 3 programs have in common (all in one .zip):
  284.        - true 32 Bit applications
  285.        - easy to install, easy to use
  286.        - As far as I know they work stable
  287.          (except the DOS version working as a Windows window
  288.          [you can use it with Windows but it crashes on *exit*])
  289.        - they don't require expensive hardware 
  290.          (and they don't need a co-processor)
  291.  
  292.     To be more specific:
  293.           OS/2 PM               OS/2                DOS    
  294.     OS    >= OS/2 2.0+ServPak   >= OS/2 2.0        >= DOS 5.0
  295.     Edit  PM, GUI,              Standard            command history
  296.           integrated editor
  297.           (cut&paste)
  298.     HW    >= 386/33, 8MB        >= 386/33 4MB       >= 386sx, 2MB
  299.           lots of MB and fast
  300.           graphics ad. recommened
  301.     Help  online                online
  302.           (+ML ref. in german)
  303.  
  304. ANU ML
  305.     ANU ML is descended from Cardelli's ML Pose 3.  It implements the
  306. core language of the standard and an old version of modules.  It incrementally
  307. compiles to native code on Sun-3, Vax/Ultrix, Pyramid and MacII/AUX.  (It
  308. is intended to standardize modules and do the port to Sun-4 in the near
  309. future.)
  310.     ANU ML has a program development system with strong support for
  311. debugging (tracing, automatic retesting etc.) and has been extended with
  312. a built-in type complex.  
  313.     ANU ML is still considered to be in beta release since exceptions
  314. have been standardized quite recently.  It is available from Malcolm Newey,
  315. CS Dept., Australian National University (mcn@anucsd.anu.edu.au) by
  316. arrangement; soon to be available by ftp.
  317.  
  318. MicroML
  319.     MicroML is an interpreter for a subset of SML that runs on IBM PCs,
  320. from the Institute of Information Processing at the University of Umea in
  321. Sweden.  It implements the core language except for records.  A 80286
  322. processor or better is recommended.
  323.     MicroML is available as an alpha-release by anonymous ftp from
  324. ftp.cs.umu.se /pub/umlexe01.uue.  There are several known bugs in the current
  325. version.  For more information contact Olof Johansson (olof@cs.umu.se) or
  326. Roger Mahler (mahler@cs.umu.se).
  327.  
  328. sml2c
  329.     sml2c is a Standard ML to C compiler.  It is based on SML/NJ and
  330. shares its front-end and most of the runtime system. sml2c is a batch
  331. compiler and compiles only module-level declarations.  It does not support
  332. SML/NJ style debugging and profiling.
  333.     sml2c is easily portable and has been ported to IBM RT, 
  334. Decstation 3100, Decstation 5000, Omron Luna 88k, sun-3, sun-4 and a 
  335. 486-based machine (running Mach).  The generated code is highly portable 
  336. and makes very few assumptions about the target machine or the C compilers 
  337. available on the target machine. The runtime system, which it shares with 
  338. the SML/NJ has several machine and operating system dependencies.  sml2c 
  339. has eliminated some of these dependencies by using portable schemes for 
  340. garbage collection and for freezing and restarting programs.
  341.     sml2c is available by anonymous ftp from dravido.soar.cs.cmu.edu
  342. (128.2.220.26). Log in as anonymous, send username@node as password.  The
  343. compressed tar file sml2c.tar.Z can be found in /usr/nemo/sml2c.  The local
  344. ftp software will allow you to change directory only to /usr/nemo/sml2c.
  345. The size of the tar file is about 3 Meg. The size of the uncompressed
  346. distribution is about 12 Meg.
  347.  
  348. Caml Light
  349.  
  350. Caml Light is a portable, bytecode interpreter for a subset of CAML, 
  351. a dialect of ML.  Some features of Caml Light include separate compilation,
  352. streams and stream parsers, ability to link to C code, and tools for
  353. building libraries and toplevel systems.  The PC versions provide
  354. line editing and the 80386 port is VCPI-compliant.  An SML-core front-end
  355. is available for Caml Light (See Moscow SML entry below). 
  356.  
  357. The Unix version should work on any modern workstation. We have tested
  358. it on Sun 3 and 4, DecStations, HP 9000/700 and 9000/350, IBM RS/6000,
  359. SGI Indigo, Sony News, Next cubes, and some more exotic machines.
  360. The Macintosh version is now a standalone Macintosh application, and
  361. no longer requires the Macintosh Programmer's Workshop. (Well, at
  362. least for the toplevel environment; the batch compilers still run
  363. under MPW.) The application provides some graphics primitives.
  364. The PC version still comes in two flavors, one that run on any PC, but
  365. is severely limited by the 640K barrier, and one that run on 80386 or
  366. 80486 PC's in 32 bit protected mode to circumvent these limitations.
  367. Both versions now provide the same graphics primitives as the
  368. Macintosh version.  Ports to OS/2 and to the Amiga are in progress.
  369.  
  370. The version 0.6 of the Caml Light system has been released, and is
  371. available by anonymous FTP from:
  372.  
  373.         host:      ftp.inria.fr (192.93.2.54)
  374.  
  375.         directory: lang/caml-light
  376.  
  377.     Summary of the files:
  378.  
  379.         README                  More detailed summary
  380.         cl6unix.tar.Z           Unix version
  381.         cl6macbin.sea.hqx       Binaries for the Macintosh version
  382.         cl6macsrc.sea.hqx       Source code for the Macintosh version
  383.         cl6pc386bin.zip         Binaries for the 80386 PC version
  384.         cl6pc386src.zip         Source code for the 80386 PC version
  385.         cl6pc86bin.zip          Binaries for the 8086 PC version
  386.         cl6pc86src.zip          Source code for the 8086 PC version
  387.         cl6refman.*             Reference manual, in various formats
  388.         cl6tutorial.*           Tutorial, in various formats
  389.  
  390. This release is mostly a bug-fix release and should be compatible with
  391. Caml Light 0.5. The main changes are:
  392.  
  393. * Better handling of type abbreviations.
  394.  
  395. * Debugging mode (option -g to camlc and camllight) to get access
  396.   to the internals of module implementations.
  397.  
  398. * New library modules:
  399.     genlex    generic lexical analyser
  400.     set       applicative sets over ordered types
  401.     map       applicative maps over ordered types
  402.     baltree   balanced binary trees over ordered types
  403.  
  404. * "compile" command at toplevel (especially useful in the Macintosh version).
  405.  
  406. * New contributed libraries and tools:
  407.     camlmode    Emacs editing mode for Caml Light
  408.     mletags     Indexing of Caml Light source files for use with Emacs "tags"
  409.     search_isos Search libraries by types (modulo isomorphisms)
  410.     libgraph    X implementation of the portable graphics library
  411.     libnum      Arbitrary-precision arithmetic
  412.     libstr      String operations, regular expressions
  413.  
  414. * The 80386 PC version is now DPMI-compliant, hence it can run under Windows
  415.   (in text mode inside a DOS windows and with no graphics, though).
  416.  
  417. * More examples, including those from the book "Le langage Caml".
  418.  
  419. General questions and comments of interest to the Caml community
  420. should be sent to caml-list@margaux.inria.fr, the Caml mailing list.
  421. (see question 3 above for details.)
  422.  
  423. ML Kit Compiler
  424.  
  425.   The ML Kit is a straight translation of the Definition of Standard
  426. ML into a collection of Standard ML modules.  For example, every
  427. inference rule in the Definition is translated into a small piece of
  428. Standard ML code which implements it. The translation has been done
  429. with as little originality as possible - even variable conventions
  430. from the Definition are carried straight over to the Kit.
  431.  
  432.   If you are primarily interested in executing Standard ML programs
  433. efficiently, the ML Kit is not the system for you! (It uses a lot of
  434. space and is very slow.) The Kit is intended as a tool box for those
  435. people in the programming language community who may want a
  436. self-contained parser or type checker for full Standard ML but do not
  437. want to understand the clever bits of a high-performance compiler. We
  438. have tried to write simple code and module interfaces; we have not
  439. paid any attention to efficiency.
  440.  
  441.   The documentation is around 100 pages long and is provided with the
  442. Kit. It explains how to build, run, read and modify the Kit. It also
  443. describes how typing of flexible records and overloading are handled
  444. in the Kit.
  445.  
  446.   The ML Kit is written by Nick Rothwell, David N. Turner, Mads Tofte
  447. and Lars Birkedal at Edinburgh and Copenhagen Universities.
  448.    
  449.   The ML Kit is available via anonymous ftp. Here is a sample dialog:
  450.  
  451.   ftp ftp.diku.dk              ftp ftp.dcs.ed.ac.uk
  452.   Name: anonymous              Name: anonymous
  453.   Password: <your loginname@host>      Password: <your loginname@host>
  454.   ftp> binary                  ftp> binary
  455.   ftp> cd diku/users/birkedal          ftp> cd export/ml/mlkit
  456.   ftp> get README              ftp> get README
  457.   ftp> get COPYING              ftp> get COPYING
  458.   ftp> get src.tar.Z              ftp> get src.tar.Z
  459.   ftp> get doc.tar.Z              ftp> get doc.tar.Z
  460.   ftp> get tools.tar.Z          ftp> get tools.tar.Z
  461.   ftp> get examples.tar.Z          ftp> get examples.tar.Z
  462.   ftp> bye                  ftp> bye
  463.  
  464. The file README contains installation instructions. Note that no
  465. binaries are distributed and that you must build these using either
  466. Standard ML of New Jersey, or Poly/ML.
  467.  
  468. MOSCOW SML
  469.  
  470. Moscow SML is a Core *Standard* ML implementation, based on the Caml
  471. Light runtime system.  It compiles fast and uses little memory,
  472. typically 5-10 times less than SML/NJ and 2-3 times less than
  473. Edinburgh ML.  Yet the bytecode is only 3 to 10 times slower than
  474. SML/NJ 0.93 compiled native code (fast on PCs, slower on RISCs).
  475.  
  476. Under DOS, Moscow SML requires a 386 or 486 PC with 2 MB of RAM or
  477. more, and DOS 3.3 or later.  The installation requires around 360 KB
  478. disk space.  It can be compiled on any platform supported by Caml
  479. Light; so far we have tried Intel386-based PCs running DOS or Windows
  480. or Linux, DEC MIPS running Ultrix, and DEC Alpha running OSF/1.
  481.  
  482. The current version 1.00 of Moscow SML does not implement SML modules
  483. (signatures, structures, functors), and does not raise arithmetic
  484. exceptions properly.  Moscow SML has been systematically tested.
  485.  
  486. Moscow SML was written by Sergei Romanenko (sergei-romanenko@refal.msk.su) 
  487. at Keldysh Institute of Applied Mathematics, Russian Academy of
  488. Sciences, Moscow, Russia, with some assistance from Peter Sestoft at
  489. the Department of Computer Science, Technical University of Denmark.
  490.  
  491. A Moscow SML executable for DOS and Windows is in
  492.     dina.kvl.dk:pub/Peter.Sestoft/mosml/mos1bin.zip
  493. The source files are in 
  494.     dina.kvl.dk:pub/Peter.Sestoft/mosml/mos1src.tar.gz
  495.  
  496. You will need Caml Light 0.6 and gcc to compile Moscow SML for Unix.
  497. --------------------------------------------------------------------------
  498. 4. Unsupported SML/NJ Ports
  499.  
  500. This section describes various ports of SML/NJ (see section 5) 
  501. that are not directly supported by the NJ folks.  
  502.  
  503. MS-DOS/Windows?
  504. ---------------
  505. (From Dave MacQueen)
  506.  
  507. There _used to be_ an MS-Windows/MSDOS implementation of Standard ML of New
  508. Jersey available by annonymous ftp on research.att.com, directory
  509. dist/ml/working/sml-386.  This port was done by Yngvi Guttesen at the
  510. Danish Technical University in Copenhagen, and it is based on version
  511. 0.75 of SML/NJ.  The distribution consists of the following four
  512. files.
  513.  
  514. -rw-rw-r--  1  dbm     other    417 Feb 16  1993 README
  515. -rw-rw-r--  1  dbm     other  51375 Feb  7  1992 doc.tar.Z
  516. -rw-rw-r--  1  dbm     other 749105 May  5  1992 mo.386.tar.Z
  517. -rw-rw-r--  1  dbm     other 851445 Feb  7  1992 src.tar.Z
  518.  
  519. This Windows port is rather delicate, and when we got it we had a lot
  520. of trouble getting it working here at Bell labs.  We tried several
  521. different machines and finally found one on which it would run (a
  522. Gateway 2000 with 16 MB of RAM), though even then it was not very
  523. robust or fast.  It seemed to be a problem of finding a machine with
  524. just the right memory management configuration.  I must admit that
  525. memory management under Windows is a black art that I am not familiar
  526. with, so I have no idea how to characterize the required memory
  527. configuration.
  528.  
  529. My conclusion is that the current Windows 3.1/MSDOS environment is so
  530. difficult that it would require a major additional investment to have
  531. a really useful port.  Guttesen did not have a 32 bit C compiler
  532. available, so he rewrote the runtime system in assembler, which makes
  533. it difficult to modify his port.  An alternative is to wait for
  534. Windows NT (Win32) or OS/2 ports, which may be done in the coming
  535. months (a couple of people have independently been working on OS/2
  536. ports recently).  Another alternative is to look in directory pub/ml
  537. of ftp.dcs.ed.ac.uk, where there are a couple of (partial)
  538. implementations of SML that run on PCs.  A third alternative is to
  539. look into Xavier Leroy's CAML Light.  (Details of these are in the
  540. comp.lang.ml FAQ message.)
  541.  
  542. However, Guttesen's 386 code generator was used by Mark Leone of CMU
  543. as the basis for a port to Unix on Ix86 machines.  The current release
  544. of SML of New Jersey (0.93) incorporates Intel/Unix support for Mach
  545. (used at Carnegie-Mellon University), BSD386 (a product of BSDI?), and
  546. 386bsd (a free version of Unix for the PC).  There are also versions
  547. that run under Linux (available as part of the free Linux distribution)
  548. and SVR4, although we have not yet integrated the code supporting
  549. Linux and SVR4 into the distributed 0.93 runtime system.  Interest has
  550. been expressed in a port for SCO Unix, but, as far as we know, no one
  551. has done such a port.
  552.  
  553. Very recently Peter Bertelsen of the Technical University of Denmark
  554. has done a port to OS2, which is now available on research.att.com,
  555. directory dist/ml.
  556.  
  557. Linux?
  558. ------
  559. (Thanks to Ralf Reetz, Peter Su, and Mark Leone)
  560.  
  561. Various ftp sites that seem to carry SML/NJ version 0.93 for Linux:
  562.  
  563.     ftp.rz.uni-karlsruhe.de:/linux/mirror.tsx/
  564.  
  565.         binaries/usr.bin/njsml.93.bin.z
  566.         sources/usr.bin/njsml.93.linux.README
  567.         sources/usr.bin/njsml.93.linux.README.NEW
  568.         sources/usr.bin/njsml.93.linux.diffs.z
  569.         sources/usr.bin/njsml.93.src.tar.z
  570.  
  571.     ftp@tsx-11.mit.edu:/pub/linux/
  572.  
  573.            sources/usr.bin/njsml.93.src.tar.z
  574.  
  575.     sbcs.sunysb.edu:/pub/linux/njsml.93.src.tar.z
  576.     sbcs.sunysb.edu:/pub/linux/njsml.93.mo.i386.z
  577.  
  578.     ftp.dcs.glasgow.ac.uk?
  579.  
  580. From the README file:
  581.  
  582.              Standard ML of New Jersey
  583.     Version 0.93 for the i386/i486 running Linux, April 23, 1993
  584.  
  585.  
  586. __ WHAT
  587.     SML/NJ is a compiler for the functional programming language
  588.     Standard ML (SML). It is a fairly complete and robust
  589.     implementation of ML.
  590.  
  591. __ FILES
  592.     njsml.93.bin.z - gzip'd binary of njsml (no SourceGroup)
  593.     njsml-sg.93.bin.z - gzip'd binary of njsml with SourceGroup
  594.     njsml.93.src.tar.z - minimal sources for NJSML on Linux
  595.     njsml.93.mo.i386.z - you'll need these also to compile on Linux
  596.  
  597.     You can pick up additional tools and goodies from:
  598.  
  599.     research.att.com
  600.  
  601.     under the "ml" directory.
  602.  
  603. __ HISTORY
  604.  
  605.     This is a port of Standard ML of New Jersey (SML/NJ) to Linux. It
  606.     is based on the work of Mark Leone (mleone@cs.cmu.edu) who did
  607.     the port for i386/i486 machines. The current binary was compiled
  608.     using Linux 0.99.7a.  Shared lib 4.3.3.
  609.  
  610.     This port was done by Sanford Barr (sbarr@cs.sunysb.edu) based on
  611.         the original port of 0.91 by Hermano Moura (moura@dcs.glasgow.ac.uk)
  612.     and Andre Santos (andre@dcs.glasgow.ac.uk).
  613.  
  614. __ RECOMMENDED ENV
  615.  
  616.     16M of ram is suggested if you wish to do anything serious with
  617.     the system.  Also, a 386-40 or better would be helpful.
  618.  
  619.  
  620. __ KNOWN BUGS AND DEFICIENCIES
  621.  
  622.     1 Some minimal precision problems exist when a 387 emulator is
  623.       used.
  624.  
  625.     2 ML functions System.Directory.listDir and System.Directory.getWD
  626.       not working at the moment.
  627.  
  628. __ WHERE
  629.  
  630.     NJ-SML 0.93 should be available at most major Linux sites.  It
  631.     should also be available in:
  632.         sbcs.sunysb.edu:/pub/linux
  633.     by the time you are reading this.
  634.  
  635. There have been reported problems with the Div exceptions (real & int).
  636. The problems have been corrected.  See:
  637.  
  638.     ftp.id.dth.dk (Internet 130.225.76.51)
  639.     file pub/sestoft/sml93-linux99pl12/sml.gz
  640.  
  641. That version also allows profiling; see the README file.
  642.  
  643. OS/2:
  644. -----
  645. Standard ML of New Jersey (version 0.93) for OS/2 has been implemented using
  646. Mark Leone's i386 code generator and the Unix emulator EMX (copyright of
  647. Eberhard Mattes). It is an (almost) complete implementation of SML/NJ 0.93.
  648. Only a few System.* functions have been left unimplemented.
  649.  
  650. Features of this 2nd release for OS/2:
  651.  * Signal handling
  652.  * Interval timers (real-time, supports CML 0.9.8)
  653.  * 'Garbage flushing', yields better performance on low-memory machines
  654.  * Reduced executable size (well, now it equals the other ports ;-)
  655.  * Exporting supported (also in the binary-only package)
  656.  * Improved MakeML & BindCore utilities
  657.  * Generally more robust
  658.  * Using EMX version 0.8h (the latest release at this moment)
  659.  
  660. Available from research.att.com (in /dist/ml/) and, in Europe, from
  661. ftp.id.dth.dk (in /pub/bertelsen/) as:
  662.    93.os2b.exe.zip  Binary-only, SML/NJ interactive compiler (executable)
  663.    93.os2b.src.zip  Sources & documentation
  664.    93.os2b.txt      Introduction
  665. See 93.os2b.txt for system requirements and details on .zip files.
  666.  
  667. Peter Bertelsen  (c917023@id.dth.dk)
  668. Department of Computer Science, Technical University of Denmark
  669.  
  670. FreeBSD:
  671. --------
  672. SML/NJ is also available in source and binary format for FreeBSD from
  673. freebsd.cdrom.com:/pub/FreeBSD/packages/sml_src.tgz and sml_bin.tgz.
  674. The binary package includes EXene and CML as well.
  675.  
  676. NEXTSTEP:
  677. ---------
  678. The CSDMteam at the University of Munich proudly presents the port of 
  679. Standard  ML of NJ, version 0.93, to NEXTSTEP for Intel processors.
  680.  
  681. The modified source can be found at ftp.informatik.uni-muenchen.de:
  682. /pub/comp/programming/languages/sml/NJ-0.93/93.src.nsfip.tar.Z (please look 
  683. at the installation instructions in the file README.NeXT.I386).
  684.  
  685. A precompiled binary of the interpreter (gzip'ed) is located at  
  686. ftp.informatik.uni-muenchen.de:/pub/comp/platforms/next/Developer/languages/ml 
  687. /sml.0.93.I.b.gz.
  688.  
  689. --------------------------------------------------------------------------
  690. 5. Where can I find documentation on SML?
  691.  
  692. THE DEFINITION.
  693.  
  694. Robin Milner, Mads Tofte and Robert Harper
  695. The Definition of Standard ML
  696. MIT, 1990.
  697. ISBN: 0-262-63132-6
  698.  
  699. Robin Milner and Mads Tofte
  700. Commentary on Standard ML
  701. MIT, 1991
  702. ISBN: 0-262-63137-7
  703.  
  704. TEXTS.
  705.  
  706. Jeffrey D. Ullman
  707. Elements of ML Programming
  708. Prentice-Hall, 1993 (Oct. 15)
  709. ISBN: 0-13-184854-2
  710. (See Comp.Lang.ML archives, message from Ullman dated 22 Sep 1993 for
  711.  chapter headings.)
  712.  
  713. Rachel Harrison
  714. Abstract Data Types in Standard ML
  715. John Wiley & Sons, April 1993
  716. ISBN: 0-471-938440
  717.  
  718. Ake Wikstrom
  719. Functional Programming Using Standard ML
  720. Prentice Hall 1987
  721. ISBN: 0-13-331661-0
  722.  
  723. Chris Reade
  724. Elements of Functional Programming
  725. Addison-Wesley 1989
  726. ISBN: 0-201-12915-9
  727.  
  728. Lawrence C Paulson
  729. ML for the Working Programmer
  730. Cambridge University Press 1991
  731. ISBN: 0-521-39022-2
  732.  
  733. Stefan Sokolowski
  734. Applicative High Order Programming: The Standard ML perspective
  735. Chapman & Hall 1991
  736. ISBN: 0-412-39240-2     0-442-30838-8 (USA)
  737.  
  738. Ryan Stansifer
  739. ML Primer
  740. Prentice Hall, 1992
  741. ISBN 0-13-561721-9
  742.  
  743. Colin Myers, Chris Clack, and Ellen Poon
  744. Programming with Standard ML
  745. Prentice Hall, 1993
  746. ISBN 0-13-722075-8 (301pp)
  747.  
  748. The following report is available from the LFCS (Lorraine Edgar,
  749. lme@dcs.ed.ac.uk) and costs 5 pounds or 10 US dollars.  It covers all of
  750. Standard ML.  The report is also available via the World Wide Web off of
  751. http://www.cs.cmu.edu:8001/afs/cs.cmu.edu/project/fox/mosaic/HomePage.html.
  752. Alternatively, the report can be ftp'd from ftp.cs.cmu.edu as the file
  753. /afs/cs/project/fox/mosaic/intro-notes.ps.
  754.  
  755. Robert Harper
  756. Introduction to Standard ML
  757. LFCS Report Series  ECS-LFCS-86-14
  758. Laboratory for Foundations of Computer Science
  759. Department of Computer Science
  760. University of Edinburgh
  761. Nov. 1986 (revised Jan. 1989 by Nick Rothwell and Kevin Mitchell)
  762.  
  763. The following report is available from the LFCS (Lorraine Edgar,
  764. lme@dcs.ed.ac.uk) and costs 2.50 pounds or 5 US dollars for single
  765. copies and 1.50 pounds or 3 dollars when bought in bulk.  It includes
  766. an introduction to Standard ML and 3 lectures on the modules system.
  767.  
  768. Mads Tofte
  769. Four Lectures on Standard ML
  770. LFCS Report Series  ECS-LFCS-89-73
  771. Laboratory for Foundations of Computer Science
  772. Department of Computer Science
  773. University of Edinburgh
  774. March 1989
  775.  
  776. The following report is available from the LFCS (Lorraine Edgar,
  777. lme@dcs.ed.ac.uk) and is free.  It introduces Extended ML, a language
  778. for writing (non-executable) specifications of Standard ML programs and
  779. for formally developing Standard ML programs from such specifications.
  780.  
  781. Don Sannella
  782. Formal program development in Extended ML for the working programmer.
  783. LFCS Report Series  ECS-LFCS-89-102
  784. Laboratory for Foundations of Computer Science
  785. Department of Computer Science
  786. University of Edinburgh
  787. December 1989
  788.  
  789. Le projet Cristal at INRIA Rocquencourt has set up a WWW server for
  790. information regarding its activities, especially the Caml and Caml Light
  791. compilers. The server also offers on-line access to documentation,
  792.  publications and to a database of BibTex references in CS.
  793. Welcome to http://pauillac.inria.fr/
  794.  
  795. Please report problems and suggestions to me or to Xavier.Leroy@inria.fr.
  796.  
  797. --------------------------------------------------------------------------
  798. 6. Where can I find library code?
  799.  
  800. a. The Edinburgh SML Library
  801.  
  802.  The Edinburgh SML Library provides a consistent set of functions on the
  803.  built-in types of the language and on vectors and arrays, and a few extras.
  804.  It includes a "make" system and a consistent set of parsing and unparsing
  805.  functions.  The library consists of a set of signatures with sample portable
  806.  implementations, full documentation, and implementations for Poly/ML,
  807.  Poplog ML and SML/NJ that use some of the non-standard primitives
  808.  available in those systems.  It is distributed with Poly/ML, Poplog ML and
  809.  Standard ML of New Jersey.  It is also available from the LFCS.
  810.  
  811.  The library documentation is available as a technical report from the LFCS
  812.  (Lorraine Edgar, lme@dcs.ed.ac.uk) and costs 5 pounds or 10 US dollars.
  813.  The LaTeX source of the report is included with the library.
  814.  
  815.  Dave Berry
  816.  The Edinburgh SML Library
  817.  LFCS Report Series  ECS-LFCS-91-148
  818.  Laboratory for Foundations of Computer Science
  819.  Department of Computer Science
  820.  University of Edinburgh
  821.  April 1991
  822.  
  823. b. The SML/NJ Library
  824.  
  825.  The SML/NJ Library is distributed with the SML of New Jersey compiler.
  826.  It provides a variety of utilities such as 2-dimensional arrays, sorting,
  827.  sets, dictionaries, hash tables, formatted output, Unix path name
  828.  manipulation, etc.  The library compiles under SML/NJ but should
  829.  be mostly portable to other implementations.
  830.  
  831.  Here is some info regarding a toolbox of SML modules aimed towards
  832.  AI programming, 
  833.  
  834. c. The Qwertz Toolbox
  835.  
  836.  The qwertz toolbox, a library of Standard ML modules with an emphasis
  837.  on symbolic Artificial Intelligence programming, may now be obtained
  838.  by anonymous ftp at:
  839.  
  840.     ftp.gmd.de:gmd/ai-research/Software/qwertz.tar.gz
  841.  
  842.  The qwertz.tar.gz file is a tar archive compressed using the the GNU
  843.  gzip program.  Use the gunzip program to decompress it.  The
  844.  README file explains how the install the library.  
  845.  
  846.  The toolbox includes: symbols and symbolic expressions, tables
  847.  including association lists, sets, queues and priority queues,
  848.  streams, heuristic search including A* and iterative deepening,
  849.  and an ATMS reason maintenance system.
  850.  
  851. --------------------------------------------------------------------------
  852. 7. Theorem Provers and ML
  853.  
  854. (Collected by Paul Black, pblack@cs.berekeley.edu.  Thanks Paul!)
  855.  
  856. - LCF (Edinburgh LCF and Cambridge LCF)
  857.     * written in the original Edinburgh dialect of ML from which SML developed.
  858.  
  859.    "Logic and Computation: Interactive Proof with Cambridge LCF"
  860.     also by Lawrence C. Paulson.
  861.  
  862.  
  863. - Lego (LFCS, Edinburgh Univ., SML)
  864.     * originally developed in CAML
  865.     * latest version (5) now runs under SML/NJ 
  866.     * only higher-order resolution
  867.     * available via anon. ftp from ftp.dcs.ed.ac.uk:/pub/lego
  868.  
  869. - HOL90 
  870.    Authors = Konrad Slind, Elsa Gunter
  871.    elsa@research.att.com, slind@informatik.tu-muenchen.de
  872.    http://lal.cs.byu.edu/lal/hol-documentation.html
  873.    
  874.    hol90 is a free implementation in SML/NJ of Mike Gordon's HOL logic (a
  875.    polymorphic version of Church's Simple Type Theory). The system provides
  876.    a lot of automated support including:
  877.    
  878.    - a powerful rewriting package;
  879.    - pre-installed theories for booleans, products, sums, natural
  880.      numbers, lists, and trees;
  881.    - definition facilities for recursive types and recursive functions
  882.      over those types (mutual recursion is also handled);
  883.    - extensive libraries for strings, sets, group theory, integers, the
  884.      real numbers, wellordered sets, automatic solution of goals
  885.      involving linear arithmetic, tautology checking, inductively
  886.      defined predicates, Hoare logic, Chandy and Misra's UNITY theory,
  887.      infinite state automata, and many others.
  888.  
  889.    The HOL community has a lively mailing list accessible at
  890.    info-hol-request@leopard.cs.byu.edu and a yearly user's meeting that
  891.    alternates between Europe and North America. hol90 is available by
  892.    anonymous ftp from
  893.  
  894.        machine = ftp.informatik.tu-muenchen.de
  895.      directory = local/lehrstuhl/nipkow/hol90/hol90.6.tar.Z
  896.      or
  897.        machine = research.att.com
  898.      directory = dist/ml/hol90/hol90.6.tar.Z
  899.  
  900. - NuPrl (from Bob Constable`s group at Cornell)
  901.  
  902. - Isabelle (Lawrence C. Paulson, Cambridge Univ. )
  903.     * has rewriting, but not many decision procedures.  It does has
  904.     things like model elimination-based decision procedures.
  905.     * a generic automatic theorem prover i.e. you can program it to
  906.     the logic system/proof system you want.  Already has the
  907.     following subsystems already implemented:
  908.         i) FOL - first order logic
  909.         ii) HOL - higher order logic
  910.         iii) LCF - Logic of computable functions
  911.         iv) LK - Gentzen system LK
  912.         v) Modal - Modal logic systems T, S4, S43
  913.         vi) ZF - Zermelo-Fraenkel set theory
  914.     * ftp from <gannet.cl.cam.ac.uk>
  915.  
  916. - MERILL (Brian Matthews, U. of Glasgow & Rutherford Appleton Laboratory)
  917.     * written in standard ML
  918.     * a general purpose order-sorted equational reasoning system
  919.     * Allows the user to declare their own object language, allows
  920.     AC-rewriting and AC-unification of terms and equations, has
  921.     several completion algorithms, is built on a hierarchy of
  922.     types known as Order-Sorting, and allows the user to try
  923.     different termination methods.
  924.     * available via anonymous ftp from the University of Glasgow,
  925.     ftp address: ftp.dcs.glasgow.ac.uk (130.209.240.50)
  926.     * Brian Matthews, brian@dcs.glasgow.ac.uk or bmm@inf.rl.ac.uk
  927.  
  928. - FAUST (Karlsruhe)
  929.     * a HOL add-on written in ML.
  930.     * ftp from goethe.ira.uka.de (129.13.18.22)
  931.  
  932. - Alf
  933.     * written in SML
  934.     * An implementation of Martin-Lofs type theory with dependent types
  935.     * Proof editor
  936.     * available by anonymous ftp from cs.chalmers.se
  937.     * only higher-order resolution
  938.  
  939. - Coq
  940.     * written in Caml-Light (but Caml-Light and SML are VERY similar)
  941.     * no serious automated reasoning subsystems (other than
  942.     higher-order resolution), but has a VERY nice package for
  943.     program verification.
  944.     * available via anon. ftp from ftp.inria.fr:/INRIA/coq/V5.8
  945.     * possible contact: Chet Murthy <murthy@cs.cornell.edu>
  946.  
  947. - ICLHOL/ProofPower (ICL Secure Systems)
  948.     * a commercial system using a reimplementation of HOL in SML
  949.     * contact ProofPower-server@win.icl.co.uk
  950.  
  951. - Lamdba/DIALOG (Abstract Hardware Ltd)
  952.     * a commercial tool written in Poly/ML, neither of which is free.
  953.  
  954. - Elf (Frank Pfenning, Carnegie Mellon Univ.)
  955.    * Elf is a higher-order logic programming language based on the LF
  956.     Logical Framework.
  957.    * Elf is not a theorem prover per-se, but is useful for specifying
  958.     and proving properties of programming languages, logics, and their
  959.     implementations.  A number of examples are provided with the
  960.     distribution.
  961.    * The Elf implementation is written in SML/NJ and should be easily
  962.         portable to other SML implementations.
  963.    * Elf can be ftp'd from alonzo.tip.cs.cmu.edu (128.2.209.194)
  964.     in the directory /afs/cs/user/fp/public.
  965.    * A bibliography and a collection of papers regarding LF and Elf
  966.         can be found in the directory /afs/cs/user/fp/public/elf-papers.
  967.    * There is an Elf mailing list.  Contact elf-request@cs.cmu.edu to join.
  968.    * For further information, contact Frank Pfenning (fp@cs.cmu.edu).
  969.  
  970. References
  971.    "ML for the Working Programmer" by Lawrence C. Paulson contains a
  972.     small first-order theorem prover.
  973.  
  974.     Paulson also has a good chapter on writing theorem provers in ML in
  975.     "Handbook of logic in computer science",
  976.     Edited by:  S. Abramsky, Dov M. Gabbay, and T.S.E. Maibaum.
  977.     Oxford : Clarendon Press, 1992-.
  978.     CALL#: QA76 .H2785 1992 
  979.  
  980.    
  981. Others
  982.     We have an automated theorm proving system here at the University
  983.     of Tasmania, but it is still under development, currently
  984.     riddled with bugs and has an obscure "input language"; aside
  985.     from those minor problems, it'd be perfect...
  986.     La Monte H. Yarroll <piggy@hilbert.maths.utas.edu.au>
  987.  
  988.     Edinburgh's Concurrency Workbench and Sussex's Process Algebra
  989.     Mauipulator are also ML systems of note, though neither are
  990.     interactive theorem provers.
  991.  
  992.  
  993. --------------------------------------------------------------------------
  994. 8. Miscellaneous
  995.  
  996. How do I write the Y combinator in SML without using a recursive
  997. definition (i.e. "fun" or "let rec")?
  998.  
  999.     datatype 'a t = T of 'a t -> 'a
  1000.  
  1001.     val y = fn f => (fn (T x) => (f (fn a => x (T x) a)))
  1002.                          (T (fn (T x) => (f (fn a => x (T x) a))))
  1003.  
  1004. Where can I find an X-Windows interface to SML?
  1005.  
  1006.     Poly/ML, Poplog/ML, and SML/NJ all come with X-Windows interfaces.
  1007.     See the appropriate entries under section 3.  In addition, Poly/ML
  1008.     interfaces to the industry standard OSF/Motif toolkit.
  1009.  
  1010. How do I call a C function from SML/NJ?
  1011.  
  1012. See the file runtime/cfuns.c for example C functions that are in
  1013. the runtime and callable from ML.  You have to enter the function
  1014. into a table at the end of the file along with a string.  You use
  1015. the function System.Unsafe.CInterface to look up the function, using
  1016. the string as the key.  Note that you'll need to convert ML values
  1017. to C representations and back.  You'll have to rebuild the compiler
  1018. using makeml.
  1019.  
  1020. How do I get the emacs mode to work with Emacs version 19?
  1021.  
  1022. Add these three lines at the top of your `sml-init.el' file:
  1023. - ----- BEGIN addition
  1024. ; emacs 19 doesn't have `make-shell', which sml-shell needs, so get it
  1025. ; when necessary.  12 Oct 1993 M-J. Dominus (mjd@saul.cis.upenn.edu)
  1026. (autoload 'make-shell "make-shell" "Make and initialize shell buffer for SML." nil)
  1027. - ----- END addition
  1028.  
  1029. They tell emacs to load the file `make-shell.el' when it needs to use
  1030. the `make-shell' function.  
  1031.  
  1032. Then install this file as `make-shell.el' somewhere on your load path,
  1033. probably in your emacs `site-lisp' directory:
  1034.  
  1035. (defun make-shell (name program &optional startfile &rest switches)
  1036.   (let ((buffer (get-buffer-create (concat "*" name "*")))
  1037.     proc status size)
  1038.     (setq proc (get-buffer-process buffer))
  1039.     (if proc (setq status (process-status proc)))
  1040.     (save-excursion
  1041.       (set-buffer buffer)
  1042.       ;;    (setq size (buffer-size))
  1043.       (if (memq status '(run stop))
  1044.       nil
  1045.     (if proc (delete-process proc))
  1046.     (setq proc (apply 'start-process name buffer
  1047.               (concat exec-directory "env")
  1048.               (format "TERMCAP=emacs:co#%d:tc=unknown:"
  1049.                   (screen-width))
  1050.               "TERM=emacs"
  1051.               "EMACS=t"
  1052.               "-"
  1053.               (or program explicit-shell-file-name
  1054.                   (getenv "ESHELL")
  1055.                   (getenv "SHELL")
  1056.                   "/bin/sh")
  1057.               switches))
  1058.     (cond (startfile
  1059.            ;;This is guaranteed to wait long enough
  1060.            ;;but has bad results if the shell does not prompt at all
  1061.            ;;         (while (= size (buffer-size))
  1062.            ;;           (sleep-for 1))
  1063.            ;;I hope 1 second is enough!
  1064.            (sleep-for 1)
  1065.            (goto-char (point-max))
  1066.            (insert-file-contents startfile)
  1067.            (setq startfile (buffer-substring (point) (point-max)))
  1068.            (delete-region (point) (point-max))
  1069.            (process-send-string proc startfile)))
  1070.     (setq name (process-name proc)))
  1071.       (goto-char (point-max))
  1072.       (set-marker (process-mark proc) (point))
  1073.       (shell-mode))
  1074.     buffer))
  1075.  
  1076.